#!/usr/bin/perl
use lib '/home/fenner';
use SNMP::Info;

my $device = shift(@ARGV);
my $location = join(" ", @ARGV);
my $dev = SNMP::Info->new(DestHost => $device, Version => 3, AutoSpecify => 1);
if (!$dev) {
	print "Can't talk to $device!\n";
	exit;
}
$dev->set_location($location) || warn("set failed: ", $dev->error(), "\n");
if ($dev->can("copy_run_start")) {
	$dev->copy_run_start() || warn("config save failed: ", $dev->error(), "\n");
} else {
	print STDERR "Don't know how to save config on $device (", $dev->class(), ")\n";
}
